-- GENERATED SPELL FOR [Vile Bat] --


function spell0_3866(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3866', 5275, 1)
end

function spell1_3866(pUnit, Event) --@Diving Sweep,n/a--
pUnit:FullCastSpellOnTarget(7145,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3866', 0, 1)
end

function Sorts_3866(pUnit, Event)
local choix_sorts_3866 = math.random(0, 1)
if choix_sorts_3866 == 0 then
pUnit:RegisterEvent('spell0_3866', 1, 1)
end
if choix_sorts_3866 == 1 then
pUnit:RegisterEvent('spell1_3866', 1, 1)
end
end

function mob3866_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3866', math.random(1500, 3000), 1)
end

function mob3866_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3866_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3866_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3866, 1, 'mob3866_Action')
RegisterUnitEvent(3866, 2, 'mob3866_Leave')
RegisterUnitEvent(3866, 3, 'mob3866_Kill')
RegisterUnitEvent(3866, 4, 'mob3866_Die')
